package com.samuel.taskexecutor;


import com.samuel.aware.AwareConfig;
import com.samuel.aware.AwareService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @date:2017/11/23
 * @time: 14:34
 * @author:zhaoyang
 * @desc:
 **/
public class AwareMain {

    public static void main(String[] args) {

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(TaskConfig.class);
        TaskService awareService = context.getBean(TaskService.class);

        for(int i=0;i<10;i++){
            awareService.executeAsyncTask(i);
            awareService.executeAsyncTask2(i);
        }

        context.close();
    }
}
